home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / miscellaneous / science / maths / calc / source / makefile < prev    next >
Encoding:
Makefile  |  1996-09-07  |  9.7 KB  |  486 lines

  1. #!/bin/make
  2. #
  3. # Copyright (c) 1994 David I. Bell and Landon Curt Noll
  4. # Permission is granted to use, distribute, or modify this source,
  5. # provided that this copyright notice remains intact.
  6. #
  7. # Arbitrary precision calculator.
  8. #
  9. # calculator by David I. Bell
  10. # Makefile by Steve Leblanc from original by Landon Curt Noll
  11.  
  12. CCFLAGS= -O
  13. LDFLAGS= ND
  14. LNK_LIBS= LIB:lcm.lib LIB:lc.lib LIB:amiga.lib
  15. CC= lc
  16. LD= lk
  17.  
  18. #
  19. # the source files which are built into a math library
  20. #
  21. LIBSRC = alloc.c comfunc.c commath.c qfunc.c qio.c qmath.c qmod.c qtrans.c \
  22.     zfunc.c zio.c zmath.c zmod.c zmul.c
  23.  
  24. #
  25. # the object files which are built into a math library
  26. #
  27. LIBOBJS = alloc.o comfunc.o commath.o qfunc.o qio.o qmath.o qmod.o qtrans.o \
  28.     zfunc.o zio.o zmath.o zmod.o zmul.o
  29.  
  30. #
  31. # the calculator source files
  32. #
  33. CALCSRC = addop.c assocfunc.c calc.c codegen.c config.c const.c    file.c \
  34.     func.c input.c label.c listfunc.c matfunc.c obj.c opcodes.c \
  35.     string.c symbol.c token.c value.c version.c
  36.  
  37. #
  38. # we build these .o files for calc
  39. #
  40. CALCOBJS = addop.o assocfunc.o calc.o codegen.o config.o const.o file.o \
  41.     func.o input.o label.o listfunc.o matfunc.o obj.o opcodes.o \
  42.     string.o symbol.o token.o value.o version.o
  43.  
  44. # These were built by hand for the Amiga
  45. #
  46. BUILD_H_SRC= args.h config.h endian.h have_malloc.h have_stdlib.h \
  47.     have_string.h longbits.h
  48.  
  49. # these .h files are needed by programs that use libcalc.a
  50. #
  51. LIB_H_SRC= alloc.h args.h cmath.h endian.h have_malloc.h have_stdlib.h \
  52.     have_string.h longbits.h qmath.h stdarg.h zmath.h
  53.  
  54. # these .h files are neither built, nor required by libcalc.a
  55. #
  56. CALC_H_SRC= calc.h config.h func.h hist.h label.h opcodes.h stdarg.h \
  57.     string.h symbol.h terminal.h token.h value.h
  58.  
  59. # there are the complete list of .h files
  60. #
  61. H_SRC = ${CALC_H_SRC} ${LIB_H_SRC}
  62.  
  63. %.o: %.c
  64.     ${CC} ${CCFLAGS} $<
  65.  
  66. all: calc
  67.  
  68. calc: calc.lib ${CALCOBJS}
  69.     ${LD} FROM LIB:c.o ${CALCOBJS} TO calc LIB calc.lib ${LNK_LIBS} ${LDFLAGS}
  70.  
  71. calc.o: calc.c
  72.     ${CC} ${CCFLAGS} calc.c
  73.  
  74. calc.lib: ${LIBOBJS}
  75.     oml calc.lib A ${LIBOBJS}
  76.  
  77. check: calc lib/regress.cal lib/lucas.cal lib/lucas_chk.cal \
  78.     lib/test1000.cal lib/surd.cal lib/cryrand.cal
  79.     calc -q read regress
  80.  
  81. clean:
  82.     del ${LIBOBJS} ${CALCOBJS}
  83.     cd help; ${MAKE} clean
  84.     cd lib; ${MAKE} clean
  85.  
  86. # make depend stuff
  87. #
  88. addop.o: addop.c
  89. addop.o: alloc.h
  90. addop.o: calc.h
  91. addop.o: cmath.h
  92. addop.o: endian.h
  93. addop.o: func.h
  94. addop.o: have_malloc.h
  95. addop.o: have_stdlib.h
  96. addop.o: have_string.h
  97. addop.o: label.h
  98. addop.o: longbits.h
  99. addop.o: opcodes.h
  100. addop.o: qmath.h
  101. addop.o: string.h
  102. addop.o: symbol.h
  103. addop.o: token.h
  104. addop.o: value.h
  105. addop.o: zmath.h
  106. alloc.o: alloc.c
  107. alloc.o: alloc.h
  108. alloc.o: have_malloc.h
  109. alloc.o: have_stdlib.h
  110. alloc.o: have_string.h
  111. assocfunc.o: alloc.h
  112. assocfunc.o: assocfunc.c
  113. assocfunc.o: cmath.h
  114. assocfunc.o: endian.h
  115. assocfunc.o: have_malloc.h
  116. assocfunc.o: have_stdlib.h
  117. assocfunc.o: have_string.h
  118. assocfunc.o: longbits.h
  119. assocfunc.o: qmath.h
  120. assocfunc.o: value.h
  121. assocfunc.o: zmath.h
  122. calc.o: alloc.h
  123. calc.o: calc.h
  124. calc.o: cmath.h
  125. calc.o: config.h
  126. calc.o: endian.h
  127. calc.o: func.h
  128. calc.o: have_malloc.h
  129. calc.o: have_stdlib.h
  130. calc.o: have_string.h
  131. calc.o: label.h
  132. calc.o: longbits.h
  133. calc.o: opcodes.h
  134. calc.o: qmath.h
  135. calc.o: symbol.h
  136. calc.o: token.h
  137. calc.o: value.h
  138. calc.o: zmath.h
  139. codegen.o: alloc.h
  140. codegen.o: calc.h
  141. codegen.o: cmath.h
  142. codegen.o: codegen.c
  143. codegen.o: config.h
  144. codegen.o: endian.h
  145. codegen.o: func.h
  146. codegen.o: have_malloc.h
  147. codegen.o: have_stdlib.h
  148. codegen.o: have_string.h
  149. codegen.o: label.h
  150. codegen.o: longbits.h
  151. codegen.o: opcodes.h
  152. codegen.o: qmath.h
  153. codegen.o: string.h
  154. codegen.o: symbol.h
  155. codegen.o: token.h
  156. codegen.o: value.h
  157. codegen.o: zmath.h
  158. comfunc.o: alloc.h
  159. comfunc.o: cmath.h
  160. comfunc.o: comfunc.c
  161. comfunc.o: endian.h
  162. comfunc.o: have_malloc.h
  163. comfunc.o: have_stdlib.h
  164. comfunc.o: have_string.h
  165. comfunc.o: longbits.h
  166. comfunc.o: qmath.h
  167. comfunc.o: zmath.h
  168. commath.o: alloc.h
  169. commath.o: cmath.h
  170. commath.o: commath.c
  171. commath.o: endian.h
  172. commath.o: have_malloc.h
  173. commath.o: have_stdlib.h
  174. commath.o: have_string.h
  175. commath.o: longbits.h
  176. commath.o: qmath.h
  177. commath.o: zmath.h
  178. config.o: alloc.h
  179. config.o: calc.h
  180. config.o: cmath.h
  181. config.o: config.c
  182. config.o: endian.h
  183. config.o: have_malloc.h
  184. config.o: have_stdlib.h
  185. config.o: have_string.h
  186. config.o: longbits.h
  187. config.o: qmath.h
  188. config.o: value.h
  189. config.o: zmath.h
  190. const.o: alloc.h
  191. const.o: calc.h
  192. const.o: cmath.h
  193. const.o: const.c
  194. const.o: endian.h
  195. const.o: have_malloc.h
  196. const.o: have_stdlib.h
  197. const.o: have_string.h
  198. const.o: longbits.h
  199. const.o: qmath.h
  200. const.o: value.h
  201. const.o: zmath.h
  202. file.o: alloc.h
  203. file.o: args.h
  204. file.o: calc.h
  205. file.o: cmath.h
  206. file.o: endian.h
  207. file.o: file.c
  208. file.o: have_malloc.h
  209. file.o: have_stdlib.h
  210. file.o: have_string.h
  211. file.o: longbits.h
  212. file.o: qmath.h
  213. file.o: stdarg.h
  214. file.o: value.h
  215. file.o: zmath.h
  216. func.o: alloc.h
  217. func.o: calc.h
  218. func.o: cmath.h
  219. func.o: endian.h
  220. func.o: func.c
  221. func.o: func.h
  222. func.o: have_malloc.h
  223. func.o: have_stdlib.h
  224. func.o: have_string.h
  225. func.o: label.h
  226. func.o: longbits.h
  227. func.o: opcodes.h
  228. func.o: qmath.h
  229. func.o: string.h
  230. func.o: symbol.h
  231. func.o: token.h
  232. func.o: value.h
  233. func.o: zmath.h
  234. input.o: alloc.h
  235. input.o: calc.h
  236. input.o: cmath.h
  237. input.o: config.h
  238. input.o: endian.h
  239. input.o: have_malloc.h
  240. input.o: have_stdlib.h
  241. input.o: have_string.h
  242. input.o: input.c
  243. input.o: longbits.h
  244. input.o: qmath.h
  245. input.o: value.h
  246. input.o: zmath.h
  247. label.o: alloc.h
  248. label.o: calc.h
  249. label.o: cmath.h
  250. label.o: endian.h
  251. label.o: func.h
  252. label.o: have_malloc.h
  253. label.o: have_stdlib.h
  254. label.o: have_string.h
  255. label.o: label.c
  256. label.o: label.h
  257. label.o: longbits.h
  258. label.o: opcodes.h
  259. label.o: qmath.h
  260. label.o: string.h
  261. label.o: token.h
  262. label.o: value.h
  263. label.o: zmath.h
  264. listfunc.o: alloc.h
  265. listfunc.o: cmath.h
  266. listfunc.o: endian.h
  267. listfunc.o: have_malloc.h
  268. listfunc.o: have_stdlib.h
  269. listfunc.o: have_string.h
  270. listfunc.o: listfunc.c
  271. listfunc.o: longbits.h
  272. listfunc.o: qmath.h
  273. listfunc.o: value.h
  274. listfunc.o: zmath.h
  275. matfunc.o: alloc.h
  276. matfunc.o: cmath.h
  277. matfunc.o: endian.h
  278. matfunc.o: have_malloc.h
  279. matfunc.o: have_stdlib.h
  280. matfunc.o: have_string.h
  281. matfunc.o: longbits.h
  282. matfunc.o: matfunc.c
  283. matfunc.o: qmath.h
  284. matfunc.o: value.h
  285. matfunc.o: zmath.h
  286. obj.o: alloc.h
  287. obj.o: calc.h
  288. obj.o: cmath.h
  289. obj.o: endian.h
  290. obj.o: func.h
  291. obj.o: have_malloc.h
  292. obj.o: have_stdlib.h
  293. obj.o: have_string.h
  294. obj.o: label.h
  295. obj.o: longbits.h
  296. obj.o: obj.c
  297. obj.o: opcodes.h
  298. obj.o: qmath.h
  299. obj.o: string.h
  300. obj.o: symbol.h
  301. obj.o: value.h
  302. obj.o: zmath.h
  303. opcodes.o: alloc.h
  304. opcodes.o: args.h
  305. opcodes.o: calc.h
  306. opcodes.o: cmath.h
  307. opcodes.o: endian.h
  308. opcodes.o: func.h
  309. opcodes.o: have_malloc.h
  310. opcodes.o: have_stdlib.h
  311. opcodes.o: have_string.h
  312. opcodes.o: label.h
  313. opcodes.o: longbits.h
  314. opcodes.o: opcodes.c
  315. opcodes.o: opcodes.h
  316. opcodes.o: qmath.h
  317. opcodes.o: stdarg.h
  318. opcodes.o: symbol.h
  319. opcodes.o: value.h
  320. opcodes.o: zmath.h
  321. qfunc.o: alloc.h
  322. qfunc.o: endian.h
  323. qfunc.o: have_malloc.h
  324. qfunc.o: have_stdlib.h
  325. qfunc.o: have_string.h
  326. qfunc.o: longbits.h
  327. qfunc.o: qfunc.c
  328. qfunc.o: qmath.h
  329. qfunc.o: zmath.h
  330. qio.o: alloc.h
  331. qio.o: args.h
  332. qio.o: endian.h
  333. qio.o: have_malloc.h
  334. qio.o: have_stdlib.h
  335. qio.o: have_string.h
  336. qio.o: longbits.h
  337. qio.o: qio.c
  338. qio.o: qmath.h
  339. qio.o: stdarg.h
  340. qio.o: zmath.h
  341. qmath.o: alloc.h
  342. qmath.o: endian.h
  343. qmath.o: have_malloc.h
  344. qmath.o: have_stdlib.h
  345. qmath.o: have_string.h
  346. qmath.o: longbits.h
  347. qmath.o: qmath.c
  348. qmath.o: qmath.h
  349. qmath.o: zmath.h
  350. qmod.o: alloc.h
  351. qmod.o: endian.h
  352. qmod.o: have_malloc.h
  353. qmod.o: have_stdlib.h
  354. qmod.o: have_string.h
  355. qmod.o: longbits.h
  356. qmod.o: qmath.h
  357. qmod.o: qmod.c
  358. qmod.o: zmath.h
  359. qtrans.o: alloc.h
  360. qtrans.o: endian.h
  361. qtrans.o: have_malloc.h
  362. qtrans.o: have_stdlib.h
  363. qtrans.o: have_string.h
  364. qtrans.o: longbits.h
  365. qtrans.o: qmath.h
  366. qtrans.o: qtrans.c
  367. qtrans.o: zmath.h
  368. string.o: alloc.h
  369. string.o: calc.h
  370. string.o: cmath.h
  371. string.o: endian.h
  372. string.o: have_malloc.h
  373. string.o: have_stdlib.h
  374. string.o: have_string.h
  375. string.o: longbits.h
  376. string.o: qmath.h
  377. string.o: string.c
  378. string.o: string.h
  379. string.o: value.h
  380. string.o: zmath.h
  381. symbol.o: alloc.h
  382. symbol.o: calc.h
  383. symbol.o: cmath.h
  384. symbol.o: endian.h
  385. symbol.o: func.h
  386. symbol.o: have_malloc.h
  387. symbol.o: have_stdlib.h
  388. symbol.o: have_string.h
  389. symbol.o: label.h
  390. symbol.o: longbits.h
  391. symbol.o: opcodes.h
  392. symbol.o: qmath.h
  393. symbol.o: string.h
  394. symbol.o: symbol.c
  395. symbol.o: symbol.h
  396. symbol.o: token.h
  397. symbol.o: value.h
  398. symbol.o: zmath.h
  399. token.o: alloc.h
  400. token.o: args.h
  401. token.o: calc.h
  402. token.o: cmath.h
  403. token.o: endian.h
  404. token.o: have_malloc.h
  405. token.o: have_stdlib.h
  406. token.o: have_string.h
  407. token.o: longbits.h
  408. token.o: qmath.h
  409. token.o: stdarg.h
  410. token.o: string.h
  411. token.o: token.c
  412. token.o: token.h
  413. token.o: value.h
  414. token.o: zmath.h
  415. value.o: alloc.h
  416. value.o: calc.h
  417. value.o: cmath.h
  418. value.o: endian.h
  419. value.o: func.h
  420. value.o: have_malloc.h
  421. value.o: have_stdlib.h
  422. value.o: have_string.h
  423. value.o: label.h
  424. value.o: longbits.h
  425. value.o: opcodes.h
  426. value.o: qmath.h
  427. value.o: string.h
  428. value.o: symbol.h
  429. value.o: value.c
  430. value.o: value.h
  431. value.o: zmath.h
  432. version.o: alloc.h
  433. version.o: calc.h
  434. version.o: cmath.h
  435. version.o: endian.h
  436. version.o: have_malloc.h
  437. version.o: have_stdlib.h
  438. version.o: have_string.h
  439. version.o: longbits.h
  440. version.o: qmath.h
  441. version.o: value.h
  442. version.o: version.c
  443. version.o: zmath.h
  444. zfunc.o: alloc.h
  445. zfunc.o: endian.h
  446. zfunc.o: have_malloc.h
  447. zfunc.o: have_stdlib.h
  448. zfunc.o: have_string.h
  449. zfunc.o: longbits.h
  450. zfunc.o: zfunc.c
  451. zfunc.o: zmath.h
  452. zio.o: alloc.h
  453. zio.o: args.h
  454. zio.o: endian.h
  455. zio.o: have_malloc.h
  456. zio.o: have_stdlib.h
  457. zio.o: have_string.h
  458. zio.o: longbits.h
  459. zio.o: stdarg.h
  460. zio.o: zio.c
  461. zio.o: zmath.h
  462. zmath.o: alloc.h
  463. zmath.o: endian.h
  464. zmath.o: have_malloc.h
  465. zmath.o: have_stdlib.h
  466. zmath.o: have_string.h
  467. zmath.o: longbits.h
  468. zmath.o: zmath.c
  469. zmath.o: zmath.h
  470. zmod.o: alloc.h
  471. zmod.o: endian.h
  472. zmod.o: have_malloc.h
  473. zmod.o: have_stdlib.h
  474. zmod.o: have_string.h
  475. zmod.o: longbits.h
  476. zmod.o: zmath.h
  477. zmod.o: zmod.c
  478. zmul.o: alloc.h
  479. zmul.o: endian.h
  480. zmul.o: have_malloc.h
  481. zmul.o: have_stdlib.h
  482. zmul.o: have_string.h
  483. zmul.o: longbits.h
  484. zmul.o: zmath.h
  485. zmul.o: zmul.c
  486.